package com.llcbenwu.filter;


import com.llcbenwu.exception.BusinessException;
import org.springframework.stereotype.Component;

import javax.servlet.*;
import java.io.IOException;


/**
 * 过滤器
 * @author lilinchun
 * @date 2021/10/21 0021 16:55
 */
//@Component
public class TimeFilter implements Filter {


    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//        System.out.println("time filter start");
//        long start = System.currentTimeMillis();
//        chain.doFilter(request,response);
//        System.out.println("耗时：" +(System.currentTimeMillis()-start));
//        System.out.println("time filter finish");
    }


    @Override
    public void destroy() {

    }
}
